class HeartRateWorker(context: Context, params: WorkerParameters) : Worker(context, params) {
    override fun doWork(): Result {
        // 启动心率监测服务
        val serviceIntent = Intent(applicationContext, HeartRateService::class.java)
        applicationContext.startForegroundService(serviceIntent)
        return Result.success()
    }
}